package com.epoint.mobileoa.personalized.epointcompany.bizlogic;

import java.util.HashMap;

import android.os.Message;

import com.epoint.mobileoa.R;
import com.epoint.mobileoa.bizlogic.SuperView;
import com.epoint.mobileoa.bizlogic.Task;
import com.epoint.mobileoa.tools.WebServiceUtilDAL;

/**
 * @author liyc
 * @time 2012-4-27 下午3:53:14
 * @annotation 添加出差计划任务
 */
public class AddTripPlanTask extends Task {

	/**
	 * @param con
	 * @param param
	 */
	public AddTripPlanTask(SuperView con, HashMap<String, Object> param) {
		super(con, param);
	}

	@Override
	public void exectue(Message mess) throws Exception {
		String url = getCon().getString(R.string.epointcompany_rizhi_url);
		String namespace = getCon().getString(R.string.epointcompany_rizhi_namespace);
		String method = "AddBusinessTripPlan";
		WebServiceUtilDAL webservice = new WebServiceUtilDAL(url,
				method, namespace);
		webservice.addProperty("StartTime", getParam().get("StartTime").toString());
		webservice.addProperty("EndTimte", getParam().get("EndTimte").toString());
		webservice.addProperty("WorkContent", getParam().get("WorkContent").toString());
		webservice.addProperty("AddPlanTime", getParam().get("AddPlanTime").toString());
		webservice.addProperty("dispName", getParam().get("dispName").toString());
		webservice.addProperty("UserGuid", getParam().get("UserGuid").toString());
		webservice.addProperty("Address", getParam().get("Address").toString());
		webservice.addProperty("StartTimeHour", getParam().get("StartTimeHour").toString());
		webservice.addProperty("EndTimeHour", getParam().get("EndTimeHour").toString());
		webservice.addProperty("IsLate",getParam().get("IsLate").toString());
		webservice.addProperty("IsSelfBTraveling", getParam().get("IsSelfBTraveling").toString());
		webservice.addProperty("IsUseCar", getParam().get("IsUseCar").toString());
		webservice.addProperty("OuGuid", getParam().get("OuGuid").toString());
		webservice.addProperty("Area", getParam().get("Area").toString());
		webservice.addProperty("TripPartners",getParam().get("TripPartners").toString());
		webservice.addProperty("TripPartnersGuid",getParam().get("TripPartnersGuid").toString());
		webservice.addProperty("RowGuid",getParam().get("RowGuid").toString());
		
		String bs = webservice.start();
		setMessageToRefreshUI(mess, getCon(), bs);
	}

}
